// Line class - line element for scene - draws and manages a line in the scene
Line.prototype = new Shape();  
Line.prototype.constructor=Line;
function Line(x, y, w, h){
	this.x = x;
	this.y = y;
	this.w= w;
	this.h= h;
	this.updateBoundary = function(x,y,w,h){
		x = x | this.x;
		y = y | this.y;
		w = w | this.w;
		h = h | this.h;
		if(w<0){
			x = x + w;
			w = -w;
		}
		if(h<0){
			y = y + h;
			h = -h;
		}
		
		this.boundary = {x:x-this.strokeWidth,y:y-this.strokeWidth,w:w+this.strokeWidth+this.strokeWidth,h:h+this.strokeWidth+this.strokeWidth};
	}
	this.updateBoundary(this.x,this.y,this.w,this.h);
	this.draw = function(ctx){		
		ctx.beginPath();
		ctx.moveTo(this.x,this.y);
		if(this.w<0){
			//debugger;
		}
		ctx.lineTo(this.x+this.w,this.y+this.h);
		this.executeDraw(ctx);
	};
}
